package com.huangc.cn.rainbow.feign;

import com.alibaba.fastjson.JSONArray;
import com.huangc.cn.rainbow.model.CollectDataDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author MADP
 */
@Component
//@FeignClient(value = "madp-bi-collect", url ="http://10.114.14.61:9999/collect")
//@FeignClient(value = "madp-bi-collect", url ="http://10.114.10.160:17010")
//@FeignClient(value = "madp-bi-collect", url ="http://10.114.14.62:17010")
@FeignClient(value = "madp-bi-collect", url ="http://10.114.14.99:17010")
//@FeignClient(value = "madp-bi-collect", url ="http://10.114.14.60:8888/collect")
//@FeignClient(value = "madp-bi-collect", url ="http://10.114.14.107:8888/collect")
//@FeignClient(value = "madp-bi-collect", url ="http://10.114.10.165:17010")
//@FeignClient(value = "madp-bi-collect", url ="http://10.114.14.100:8888/collect")
//@FeignClient(value = "madp-bi-collect", url ="http://127.0.0.1:9999/collect")
//@FeignClient(value = "madp-bi-collect", url ="127.0.0.1:17010")
//@FeignClient(value = "madp-bi-collect", url ="http://127.0.0.1:9999/collect")
public interface CollectDataFeign {

    /**
     * 数据上传
     * @param list
     */
//    @PostMapping("/app/make-data")
//    void collect(@RequestBody List<CollectDataDto> list);

    @PostMapping("/app/make-data")
    void collect(@RequestBody List<CollectDataDto> list);

    /**
     * 卡顿原因上传
     */
//    @PostMapping("app/freezing-reason-data")
////    void collectFreezingReason(@RequestBody JSONArray freezingReason);
    @PostMapping("/app/freezing-reason-data")
    void collectFreezingReason(@RequestBody JSONArray freezingReason);
}
